<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.3.1.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        a {
            text-decoration: none;
        }
        
        .accordion,
        .accordion ul {
            font-size: 14px;
            font-weight: bold;
            width: 300px;
            margin: 0;
            padding: 0;
            list-style: none;
            text-align: center;
            border: 5px solid #343b42;
        }
        
        .accordion ul {
            border: 0;
        }
        
        .accordion ul li {
            line-height: 50px;
            height: 50px;
            color: #e6efee;
            border-bottom: 1px solid #383b4c;
            background-color: #282b3a;
        }
        
        .accordion li a {
            line-height: 60px;
            display: block;
            height: 60px;
            color: #e6efee;
            border: 2px solid #343b42;
            background-color: #3789d3;
        }
        
        .accordion li.selected a {
            color: #e6efee;
            background-color: #393c4b;
        }
        
        .accordion li ul {
            display: none;
        }
        
        .accordion li.selected ul {
            display: block;
        }
    </style>
</head>

<body>
    <div id="fold">
        <ul class="accordion">
            <li class="selected">
                <a href="#">信息管理</a>
                <ul class="wrap">
                    <li><a href="#">未读信息</a></li>
                    <li><a href="#">已读信息</a></li>
                    <li><a href="#">信息列表</a></li>
                </ul>
            </li>
            <li>
                <a href="#">商品管理</a>
                <ul class="wrap">
                    <li><a href="#">商品添加</a></li>
                    <li><a href="#">商品列表</a></li>
                    <li><a href="#">商品分类</a></li>
                </ul>
            </li>
            <li>
                <a href="#">用户管理</a>
                <ul class="wrap">
                    <li><a href="#">权限设置</a></li>
                    <li><a href="#">用户列表</a></li>
                    <li><a href="#">重置密码</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <script>
        $(".accordion li a").click(function() {
            $(this).parent().siblings().removeClass('selected').find('div').hide();
            $(this).parent().addClass('selected');
            $(this).next().slideDown(500);
        })
    </script>


</body>

</html>